<template>
	<div class="mask" v-show="isShow"></div>
</template>

<script>
  import PubSub from 'pubsub-js'
  export default {
    name: 'index',
    data(){
      return{
        isShow: false
      }
    },
    mounted(){
      PubSub.subscribe('maskShow',(msg,data)=>{
        // console.log(msg,data) // maskShow, false
        this.isShow = data
      })
    }
  }
</script>

<style lang="stylus" rel="stylesheet/stylus" scoped>
  .mask
    position: absolute
    top 0
    left 0
    width 100%
    height 100%
    z-index 30
    background rgba(0,0,0.0.3)
</style>
